import request from '/@/utils/request';

/**
 * OIDC 会话管理 API
 */

// 获取会话列表
export function getSessionList(params: any) {
  return request({
    url: '/oidc/admin/sessions',
    method: 'get',
    params,
  });
}

// 结束指定会话
export function endSession(sessionId: string) {
  return request({
    url: `/oidc/admin/session`,
    method: 'delete',
    params: {
      id: sessionId,
    },
  });
}

// 批量结束会话
export function batchEndSessions(data: any) {
  return request({
    url: '/oidc/admin/sessions/batch-end',
    method: 'post',
    data,
  });
}